2 // Loses the player rings
\r
3 var i, theta, error, inner_circ, inner_radius, outer_circ, outer_radius;
\r
5 theta = (pi/16); // Half the angle in radians between rings
\r
6 error = 0.0001; // Addition due to error in rounding
\r
9 inner_circ = rings; // Number of rings in inner circle
\r
16 outer_circ = rings - 16; // Number of rings in outer circle
\r
23 outer_radius = 35; // Radius of the outer ring circle
\r
25 // Create the outer instances of the ring losses
\r
26 for (i = -theta*(outer_circ-1); i <= theta*(outer_circ-1)+error; i += 2*theta)
\r
28 with (instance_create(x + cos(i-pi/2)*outer_radius, y + sin(i-pi/2)*outer_radius, Ring))
\r
29 event_user(0); // Calls special code when ring is of ring_loss type
\r
33 inner_radius = 5; // Radius of the inner ring circle
\r
35 // Create the inner instances of the ring losses
\r
36 for (i = -theta*(inner_circ-1); i <= theta*(inner_circ-1)+error; i += 2*theta)
\r
38 with (instance_create(x + cos(i-pi/2)*inner_radius, y + sin(i-pi/2)*inner_radius, Ring))
\r
39 event_user(0); // Calls special code when ring is of ring_loss type
\r
43 sound_play(SndRingLoss);
\r